<template>
    <NCard>
        <Question
            :data="{ realname: data.author.name, nickname: data.author.nickname, avatar: imgurl + data.author.avatar, date: data.date, text: data.content }">
        </Question>

        <template #action>
            <NSpace>
                <NButton size="small" @click="handleChange">详情</NButton>
                <NButton size="small" @click="handleDelete" type="error" v-if="false">删除</NButton>
            </NSpace>
        </template>
    </NCard>
</template>
<script setup lang="ts">
import { NCard, NAvatar, NThing, NButton, NIcon, NSpace } from "naive-ui";
import Question from "@/components/Question.vue";


const imgurl = window.apiurl + "avatar/";
const emit = defineEmits(['showDetail']);

const props = defineProps(["data"]);



function handleChange() {
    emit("showDetail", "");
}

function handleDelete() {
    emit("showDetail", "");
}

</script>